package com.gitee.wsl.ext.collection

import com.gitee.wsl.func.predicate.Predicate

/**
 * Returns a new traversable consisting of all elements which do not satisfy the given predicate.
 *
 *
 * The default implementation is equivalent to
 * <pre>`filter(predicate.negate()`</pre>
 *
 * @param predicate A predicate
 * @return a new traversable
 * @throws NullPointerException if `predicate` is null
 */
fun <T> Iterable<T>.reject(predicate: Predicate<T>) = filter(predicate.negate())

